package com.networkapp;

import com.networkapp.JsonHelper;

public enum FormatType {
    NONE, JSON, TEXT;

    public Object format(Object o) {
        Object temp = o;
        switch (this) {
            case NONE:
                temp = o;
            case JSON:
                temp = JsonHelper.toJsonString(o);
            case TEXT:
                temp = o.toString();
        }
        return temp;
    }
}